import request from '@/router/axios';

//获取动作库树状结构
export const actTreeList = (params) => {
    return request({
        url: '/library/action-classify/tree',
        method: 'get',
        params
    })
}

//获取动作库节点类型
export const getTypeList = (params) => {
    return request({
        url: '/base/structure-relate-rule/list',
        method: 'get',
        params
    })
}

//获取动作库父级节点类型
export const getactionList = (params) => {
    return request({
        url: '/library/action-classify/list',
        method: 'get',
        params
    })
}

//获取动作库表格数据
export const actDataList = (params) => {
    return request({
        url: '/library/action-classify/page',
        method: 'get',
        params
    })
}

//动作库新增
export const addatreeList = (data) => {
    return request({
        url: '/library/action-classify/add',
        method: 'post',
        data
    })
}

//动作库编辑
export const updateatreeList = (data) => {
    return request({
        url: '/library/action-classify/update',
        method: 'post',
        data
    })
}

//动作库删除
export const removeatreeList = (id) => {
    return request({
        url: '/library/action-classify/delete',
        method: 'post',
        data:{
            id
        }
    })
}

//获取编制人
export const getuser = (params) => {
    return request({
        url: '/blade-user/list',
        method: 'get',
        params
    })
}

//任务下发
export const taskTable = (data) => {
    return request({
        url: '/library/action-classify/task-issue',
        method: 'post',
        data
    })
}

//转移
export const replaceTable = (data) => {
    return request({
        url: '/library/action-classify/task-transfer',
        method: 'post',
        data
    })
}


//查询动作要领表格
export const getstep = (params) => {
    return request({
        url: '/library/action-essentials/list',
        method: 'get',
        params
    })
}

//动作要领新增&修改
export const addactstep = (data) => {
    return request({
        url: '/library/action-essentials/config',
        method: 'post',
        data
    })
}


//动作要领删除
export const removeactstep = (id) => {
    return request({
        url: `/library/action-essentials/delete/${id}`,
        method: 'post',
    })
}

//获取动作要领工具
export const getStepTool = (params) => {
    return request({
        url: '/library/action-essentials-tool/page',
        method: 'get',
        params
    })
}

//动作要领工具新增
export const addStepTool = (data) => {
    return request({
        url: '/library/action-essentials-tool/add',
        method: 'post',
        data
    })
}

//动作要领工具删除
export const removeStepTool = (id) => {
    return request({
        url: `/library/action-essentials-tool/delete/${id}`,
        method: 'post',
    })
}


//获取动作要领工装
export const getStepfrock = (params) => {
    return request({
        url: '/library/action-essentials-tooling/page',
        method: 'get',
        params
    })
}


//动作要领工装新增
export const addStepfrock = (data) => {
    return request({
        url: '/library/action-essentials-tooling/add',
        method: 'post',
        data
    })
}

//动作要领工装删除
export const removeStepfrock = (id) => {
    return request({
        url: `/library/action-essentials-tooling/delete/${id}`,
        method: 'post',
    })
}


//获取动作要领设备
export const getStepdevice = (params) => {
    return request({
        url: '/library/action-essentials-device/page',
        method: 'get',
        params
    })
}


//动作要领设备新增
export const addStepdevice = (data) => {
    return request({
        url: '/library/action-essentials-device/add',
        method: 'post',
        data
    })
}

//动作要领设备删除
export const removeStepdevice = (id) => {
    return request({
        url: `/library/action-essentials-device/delete/${id}`,
        method: 'post',
    })
}

